package com.lzwk.app.function;


import org.apache.flink.table.functions.ScalarFunction;

import java.sql.Timestamp;

/**
 * @title: SkinJson
 * @Author Yeaser
 * @Date: 2022/1/5 17:51
 * @Version 1.0
 * Description: TODO
 */
// @FunctionHint(output = @DataTypeHint("row<source_hash_id string>")) 表值函数
public class GetTimestampToLong extends ScalarFunction {
    public Long eval(Timestamp timestamp){
        if( timestamp==null ){
            return 0L;
        } else {
            return timestamp.getTime();
        }
    }
}
